package com.nameless.controller.api;

import com.nameless.dao.MaintainRecordDao;
import com.nameless.entity.MaintainRecord;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;

/**
 * @author keluoyisi
 * @program: car-parent
 * @description: 维修api
 * @date 2023-02-28 21:44:21
 */
@SuppressWarnings("all")
@RestController
@RequestMapping("/car/api/maintainRecord")
public class MaintainRecordControllerApi {
    @Autowired
    private MaintainRecordDao maintainRecordDao;
    @PostMapping("/insert")
    public int insertMaintainRecord(@RequestBody MaintainRecord maintainRecord){
        maintainRecord.setAddtime(LocalDateTime.now());
        return maintainRecordDao.insert(maintainRecord);
    }
}
